package com.major.binarysorttree;

public class BinarySortTreeMain {
    public static void main(String[] args) {
        // 7 3 10 12 5 1 9
        int[] arr = {7,3,10,12,5,1,9};
        BinarySortTree binarySortTree = new BinarySortTree();

        for (int i = 0; i < arr.length; i++) {
            binarySortTree.add(new Node(arr[i]));
        }

        binarySortTree.inOrder();
        binarySortTree.delete(1);
        System.out.println("===============================");
        binarySortTree.inOrder();
        binarySortTree.delete(3);

        System.out.println("===============================");
        binarySortTree.inOrder();
        binarySortTree.delete(7);
        System.out.println("===============================");
        binarySortTree.inOrder();
    }
}
